﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;


namespace WpfGridlock
{
    /// <summary>
    /// Логика взаимодействия для MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void StartBtn_Click(object sender, RoutedEventArgs e)
        {
            GameWindow openWnew = new GameWindow();
            openWnew.GetCountLevel(1);
            openWnew.Height = this.ActualHeight;
            openWnew.Width = this.ActualWidth;
            openWnew.WindowState = this.WindowState;
            openWnew.Show();
            this.Close();  // Закрываем текущую форму
        }

        private void RulesBtn_Click(object sender, RoutedEventArgs e)
        {
            RulesWindow openWnew = new RulesWindow();
            openWnew.Height = this.ActualHeight;
            openWnew.Width = this.ActualWidth;
            openWnew.WindowState = this.WindowState;
            openWnew.Show();
            this.Close();  // Закрываем текущую форму
        }

        private void LevelBtn_Click(object sender, RoutedEventArgs e)
        {
            LevelWindow openWnew = new LevelWindow();
            openWnew.Height = this.ActualHeight;
            openWnew.Width = this.ActualWidth;
            openWnew.WindowState = this.WindowState;
            openWnew.Show();
            this.Close();  // Закрываем текущую форму
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            this.Close(); // Закрываем текущую форму
        }
    }
}
